package com.gwtintegration.smartrfsandbox.server;

import org.apache.log4j.Logger;

import com.google.web.bindery.requestfactory.server.ExceptionHandler;
import com.google.web.bindery.requestfactory.shared.ServerFailure;

public class RequestFactoryExceptionHandler implements ExceptionHandler {

	private static final Logger logger = Logger.getLogger(RequestFactoryExceptionHandler.class);

	@Override
	public ServerFailure createServerFailure(Throwable throwable) {
		logger.error(throwable.getMessage(), throwable);
		return new ServerFailure(throwable.getMessage(), throwable.getClass().getName(), null, true);
	}

}